<template>
    <ListCard v-if="menoListTop4Readonly.length" :source="menoListTop4Readonly" typeName="便签" title="便签" :recordLog="recordLog"/>
  </template>
  <script setup name="MenoCard">
  import ListCard from './ListCard.vue';
  
  import { inject, onMounted, onActivated } from 'vue';
  import useSymbols from '../../compostions/useSymbols';
  import { TYPE_NAME_BIAN_QIAN } from '../../util/constant';

  const { getMenoDataListTop4, menoListTop4Readonly , setVisitItem } = inject(useSymbols);

  // 统计
  const recordLog = (id) => {
    setVisitItem(id, TYPE_NAME_BIAN_QIAN);
    getMenoDataListTop4();
  }
  
  onMounted(() => {
    getMenoDataListTop4();
  });
  
  onActivated(() => {
    getMenoDataListTop4();
  });
  </script>
  